﻿using System;
using System.Collections.Generic;
using System.Text;

namespace System
{
    // Summary:
    //     Represents the method that defines a set of criteria and determines whether
    //     the specified object meets those criteria.
    //
    // Parameters:
    //   obj:
    //     The object to compare against the criteria defined within the method represented
    //     by this delegate.
    //
    // Type parameters:
    //   T:
    //     The type of the object to compare.
    //
    // Returns:
    //     true if obj meets the criteria defined within the method represented by this
    //     delegate; otherwise, false.
    public delegate bool Predicate<T>(T obj);

    // Summary:
    //     Encapsulates a method that takes no parameters and does not return a value.
    public delegate void Action();

    // Summary:
    //     Encapsulates a method that has no parameters and returns a value of the type
    //     specified by the TResult parameter.
    //
    // Type parameters:
    //   TResult:
    //     The type of the return value of the method that this delegate encapsulates.
    //
    // Returns:
    //     The return value of the method that this delegate encapsulates.
    public delegate TResult Func<TResult>();


    // Summary:
    //     Encapsulates a method that has one parameter and returns a value of the type
    //     specified by the TResult parameter.
    //
    // Parameters:
    //   arg:
    //     The parameter of the method that this delegate encapsulates.
    //
    // Type parameters:
    //   T:
    //     The type of the parameter of the method that this delegate encapsulates.
    //
    //   TResult:
    //     The type of the return value of the method that this delegate encapsulates.
    //
    // Returns:
    //     The return value of the method that this delegate encapsulates.
    public delegate TResult Func<T, TResult>(T arg);
}
